<?php

$aaData =array();
$i=0;
foreach($places as $place){
	$aaData[$i++]=array(
				anchor('places/details/'.$place->id,$place->nombre),
    			$place->ciudad,
    			$place->categoria,
    			);
}
$output=array(
			'sEcho'					=> $this->input->post('sEcho'),
			'iTotalRecords'			=> $total,
			'iTotalDisplayRecords'	=> $total,
			'aaData'				=> $aaData
);
echo json_encode($output);